/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package battleshipgame.logic;

import battleshipgame.logic.Player.Direction;

/**
 *
 * 
 */
public class Battleship {
    
    private final int size; // size is final after initialization.
    private int hitPoints;  //if variable eqauls 0 the battleship was destroyed.
    private String name ;
    //private String coordinate;
    String coordinate ;
    Direction direction ;

    public static String[] battleShipNamesList = {"aircraft carrier", "battleship", "submarine", "cruiser", "destroyer"};
    public static int[] battleShipSizeList =            {5,                                             4,                              3,                       3,                         2};
    public Battleship(String  name, int size ) {
        this.name = name;
        this.size = size;
        this.hitPoints = size;
    }

    public boolean  DecreaseBattleshipHPByOne ()    { //@eliran decrease HP by one.
        hitPoints -- ;
        if ( hitPoints ==0)
            return true;
        else
            return false;
    }

//    public void setCoordinate(String coordinate) {
//        this.coordinate = coordinate;
//    }
//
//    public Battleship(String coordinate) {
//        this.coordinate = coordinate;
//    }
    public boolean IsBattleshipDead ()    { // returns true if battleship is dead, false- else..
        if ( hitPoints == 0)
            return true;
        return false;//hitPoints != 0
    }
    public int getHitCounter() { // @eliran this should be deleted if not used.
        return hitPoints;
    }

    private  void setHitCounter(int hitCounter) {// @eliran this should be deleted if not used.
        this.hitPoints = hitCounter;
    }
    
    public int getSize() {// @eliran this should be deleted if not used.
        return size;
    }

    public String getName()
    {
        return name;
    }

    public String getCoordinate() {
        return coordinate;
    }

    public Direction getDirection() {
        return direction;
    }

    public void setCoordinate(String coordinate) {
        this.coordinate = coordinate;
    }

    public void setDirection(Direction direction) {
        this.direction = direction;
    }
    
    
}
